import { lazy } from "react"
import WebIcon from "@/components/WebIcon"

const User = lazy(() => import("@/pages/User"))
const UserInfo = lazy(() => import("@/pages/User/info"))

const UserRoutes = [
  {
    path: "user",
    meta: {
      title: 'user',
      icon: <WebIcon name='data'/>
    },
    children: [
      {
        name: 'userIndex',
        path: "index",
        element: <User />,
        meta: {
          title: 'userIndex'
        }
      },
      {
        path: 'info',
        name: 'userInfo',
        children: [
          {
            path: "index",
            element: <UserInfo />,
            meta: {
              title: 'info'
            }
          }
        ]
      }
    ]
  }
]

export default UserRoutes
